package com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.steward;

import com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.domain.GooBaseGoodsAttributeValue;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttributeValue.domain.GooBaseGoodsAttributeValueCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class GooBaseGoodsAttributeValueResponse {

    @Autowired
    private GooBaseGoodsAttributeValueResController gooBaseGoodsAttributeValueResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValue.class).flatMap(gooBaseGoodsAttributeValue ->
                gooBaseGoodsAttributeValueResController.add(req, gooBaseGoodsAttributeValue)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValueCondition.class).flatMap(gooBaseGoodsAttributeValueCondition ->
                gooBaseGoodsAttributeValueResController.delete(req, gooBaseGoodsAttributeValueCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValue.class).flatMap(gooBaseGoodsAttributeValue ->
                gooBaseGoodsAttributeValueResController.modify(req, gooBaseGoodsAttributeValue)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return gooBaseGoodsAttributeValueResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return gooBaseGoodsAttributeValueResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return gooBaseGoodsAttributeValueResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValueCondition.class).flatMap(gooBaseGoodsAttributeValueCondition ->
                gooBaseGoodsAttributeValueResController.auditSubmit(req, gooBaseGoodsAttributeValueCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValueCondition.class).flatMap(gooBaseGoodsAttributeValueCondition ->
                gooBaseGoodsAttributeValueResController.audit(req, gooBaseGoodsAttributeValueCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValueCondition.class).flatMap(gooBaseGoodsAttributeValueCondition ->
                gooBaseGoodsAttributeValueResController.auditReject(req, gooBaseGoodsAttributeValueCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValueCondition.class).flatMap(gooBaseGoodsAttributeValueCondition ->
                gooBaseGoodsAttributeValueResController.usingEnable(req, gooBaseGoodsAttributeValueCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeValueCondition.class).flatMap(gooBaseGoodsAttributeValueCondition ->
                gooBaseGoodsAttributeValueResController.usingDisable(req, gooBaseGoodsAttributeValueCondition)
        );
    }   

}
